﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Mapbox.Map;

public class SortRoute : IComparer<UnwrappedTileId>
{
    public int Compare(UnwrappedTileId x, UnwrappedTileId y)
    {
        if(x.X<y.X)
        {
            return -1;
        }
        else if(x.X > y.X)
        {
            return 1;
        }
        else
        {
            if(x.Y<y.Y)
            {
                return -1;
            }
            else
            {
                return 1;
            }
        }
    }
}
